home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / timetrak / ttrakgbl.bas < prev    next >
BASIC Source File  |  1995-09-06  |  12KB  |  217 lines

  1.  
  2. Global Const MBOK = 1
  3. Global Const TRUE = 1
  4. Global Const FALSE = 0
  5. Global Const DBPATH = "g:\vb\"
  6. Global Const NOT_PROGRAMMED = 999
  7.  
  8. Global rc As Integer
  9. Global aValue As String * 255
  10. Global aSize As Integer
  11. Global sValue As Integer
  12. Global lValue As Long
  13. Global dValue As Double
  14. Global nFlds As Integer
  15. Global loadFlag As Integer
  16. Global ttrakTbl As Integer
  17. Global ttrakRec As Integer
  18. Global ttrakFlf As Integer
  19. Global projFlag As Integer
  20. Global printFlag As Integer
  21. Global projectName As String
  22. Global savproj As String * 20
  23. Global savtotal As String * 5
  24. Global pageno As Integer
  25. Global linecnt As Integer
  26. Global key1(25, 1 To 2) As String * 20
  27. Global key2(25, 1 To 2)  As Integer
  28.  
  29. Global mm As Integer
  30. Global dd As Integer
  31. Global yy As Integer
  32. Global tindex As Integer  '0=master,or nbr of index
  33. Global returnFld As String
  34.  
  35. Type savDate
  36.     mm As Integer
  37.     dd As Integer
  38.     yy As Integer
  39. End Type
  40.  
  41. ' pxengine.gbl
  42. ' written by J.W.Jaster 1991
  43.  
  44. Global Const PX_LOADED = 1
  45. Global Const PXDEFAULT = 0                   ' use internal default value
  46. Global Const MAXTABLEHANDLES = 64             ' maximum number of open
  47.                                         ' tables allowed at a time
  48. Global Const DEFTABLEHANDLES = 5              ' default number of open
  49.                                         ' tables allowed at a time
  50. Global Const MAXRECORDHANDLES = 128           ' maximum number of record
  51.                                         ' buffers available
  52. Global Const DEFRECORDHANDLES = 10            ' default number of record
  53.                                         ' buffers available
  54. Global Const MAXLOCKHANDLES = 128             ' maximum number of lock
  55.                                         ' handles per table
  56. Global Const DEFLOCKHANDLES = 32              ' default number of lock
  57.                                         ' handles per table
  58. Global Const MAXFILEHANDLES = 255             ' maximum number of DOS file
  59.                                         ' handles to use
  60. Global Const MINFILEHANDLES = 2               ' minimum number of DOS file
  61.                                         ' handles to use
  62. Global Const DEFFILEHANDLES = 10              ' default number of DOS file
  63.                                         ' handles to use
  64. ' Swap buffer size
  65. Global Const MAXSWAPSIZE = 256                ' maximum buffer size allowed (k)
  66. Global Const MINSWAPSIZE = 8                  ' minimum buffer size allowed (k)
  67. Global Const DEFSWAPSIZE = 32                 ' default buffer size (k)
  68.  
  69. ' Network codes
  70. ' used in PXNetInit
  71. Global Const NOTONNET = 1             ' not on a net
  72. Global Const NOVELLNET = 2            ' Novell
  73. Global Const THREECOMNET = 3          ' 3Com
  74. Global Const THREEOPENNET = 4         ' 3Com 3+Open
  75. Global Const OTHERNET = 5             ' other: unknown DOS 3.1 compatible
  76. Global Const STARLANNET = 7           ' Starlan
  77. Global Const BANYANNET = 8            ' Banyan
  78. Global Const IBMPCNET = 9             ' IBM PC
  79. Global Const LOCALSHARE = 32          ' enables sharing on local drives with
  80.                                 ' any net type
  81.                                 ' (i.e. OTHERNET | LOCALSHARE)
  82. Global Const DEFUSERNAME = ""       ' use default username in PXNetInit()
  83.                                         ' cannot proceed
  84. ' values for ShareMode argument to PXWinInit
  85. Global Const PXSINGLECLIENT = 0 ' allow no other client access to Engine DLL
  86. Global Const PXEXCLUSIVE = 1    ' open all tables with FULL LOCK
  87. Global Const PXSHARED = 2       ' open all tables with PREVENT FULL LOCK
  88. ' declarations of sort order tables, used in PXSetDefaults
  89. Global Const SortOrderAscii = "a"   ' ASCII sort order
  90. Global Const SortOrderIntl = "i"    ' international sort order
  91. Global Const SortOrderNorDan = "n"  ' Norwegian/Danish sort order
  92. Global Const SortOrderSwedFin = "s"  ' Swedish/Finnish sort order
  93. ' used in PXKeyAdd
  94. Global Const PRIMARY = 0       ' primary index (key)
  95. Global Const SECONDARY = 1     ' not maintained secondary index
  96. Global Const INCSECONDARY = 2  ' maintained secondary index
  97. ' used in PXSrchFld, PXSrchKey
  98. Global Const SEARCHFIRST = 0     ' search from beginning of table
  99. Global Const SEARCHNEXT = 1      ' search from next record in table
  100. Global Const CLOSESTRECORD = 2   ' (modifier) goto 'nearest' record if
  101.                           ' no match found (ordered fields only)
  102. ' Lock types
  103. ' used in PXNetFileLock, PXNetFileUnlock, PXNetTblLock, PXNetTblUnlock
  104. Global Const FL = 1                   ' full lock, no concurrency
  105. Global Const WL = 2                   ' write lock
  106. Global Const PWL = 3                  ' prevent write lock
  107. Global Const PFL = 4                  ' prevent full lock, full concurrency
  108. ' macros for checking blank values
  109. Global Const BLANKDATE = &H80000000
  110. Global Const BLANKLONG = &H80000000
  111. Global Const BLANKSHORT = &H8000
  112. ' successful Engine function operation returns
  113. Global Const PXSUCCESS = 0
  114. ' errorcodes from Engine functions
  115. ' initialization errors
  116. Global Const PXERR_NOTINITERR = 78            ' Engine not initialized
  117. Global Const PXERR_ALREADYINIT = 82           ' Engine already initialized
  118. Global Const PXERR_NOTLOGGEDIN = 98           ' Could not login on network
  119.                                         ' (to PARADOX.NET)
  120. Global Const PXERR_NONETINIT = 107            ' Engine not initialized
  121.                                         ' with PXNetInit
  122. Global Const PXERR_NETMULTIPLE = 15           ' multiple PARADOX.NET files
  123.  
  124. Global Const PXERR_CANTSHAREPDOXNET = 134      ' can't lock PARADOX.NET -- is
  125.                                         ' SHARE.EXE loaded?
  126. Global Const PXERR_WINDOWSREALMODE = 135       ' can't run Engine in Windows
  127.                                         ' real mode
  128. ' hardware related errors
  129. Global Const PXERR_DRIVENOTREADY = 1          ' Drive not ready
  130. Global Const PXERR_DISKWRITEPRO = 124         ' Disk is write protected
  131. Global Const PXERR_GENERALFAILURE = 126       ' General hardware error
  132. ' directory reg error codes
  133. Global Const PXERR_DIRNOTFOUND = 2            ' Directory not found
  134. Global Const PXERR_DIRBUSY = 10               ' Sharing violation
  135. Global Const PXERR_DIRLOCKED = 11             ' Sharing violation
  136. Global Const PXERR_DIRNOACCESS = 12           ' No access to directory
  137. Global Const PXERR_DIRNOTPRIVATE = 14         ' Single user, but directory is
  138.                                         ' shared
  139. ' file oriented errors
  140. Global Const PXERR_FILEBUSY = 3               ' File is busy
  141. Global Const PXERR_FILELOCKED = 4             ' File is locked
  142. Global Const PXERR_FILENOTFOUND = 5           ' Could not find file
  143. ' table oriented errors
  144. Global Const PXERR_TABLEBUSY = 118             ' Table is busy
  145. Global Const PXERR_TABLELOCKED = 119           ' Table is locked
  146. Global Const PXERR_TABLENOTFOUND = 120         ' Table was not found
  147. Global Const PXERR_TABLEOPEN = 83             ' Unable to perform operation
  148.                                         ' on open table
  149. Global Const PXERR_TABLEINDEXED = 94          ' Table is indexed
  150. Global Const PXERR_TABLENOTINDEXED = 95       ' Table is not indexed
  151. Global Const PXERR_TABLEEMPTY = 105            ' Operation on empty table
  152. Global Const PXERR_TABLEWRITEPRO = 22         ' Table is write protected
  153. Global Const PXERR_TABLECORRUPTED = 6         ' Table is corrupted
  154. Global Const PXERR_TABLEFULL = 128            ' Table is full
  155. Global Const PXERR_TABLESQL = 130             ' Table is SQL replica
  156. Global Const PXERR_INSUFRIGHTS = 21           ' Insufficient password rights
  157. ' index oriented errors
  158. Global Const PXERR_XCORRUPTED = 7             ' Primary index is corrupted
  159. Global Const PXERR_XOUTOFDATE = 8             ' Primary index is out of date
  160. Global Const PXERR_XSORTVERSION = 13          ' Sort for index different
  161.                                         ' from table
  162. Global Const PXERR_SXCORRUPTED = 122          ' Secondary index is corrupted
  163. Global Const PXERR_SXOUTOFDATE = 96           ' Secondary index is out of date
  164. Global Const PXERR_SXNOTFOUND = 121           ' Secondary index was not found
  165. Global Const PX